package me.zhengjie.modules.quartz.task.processing;

import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.sync.processing.DepartmentSyncProcessing;
import me.zhengjie.modules.sync.processing.EmployeeSyncProcessing;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/*
* 部门经纪人解析TASK
* */
@Slf4j
@Component
@Deprecated
public class OrganizationProcessingTask {
    @Autowired
    DepartmentSyncProcessing departmentSyncProcessing;

    @Autowired
    EmployeeSyncProcessing employeeSyncProcessing;

    public void processing(){
        //部门
        try {
            log.info("departmentSyncProcessing run start");
            departmentSyncProcessing.run();
            log.info("departmentSyncProcessing run end");
        } catch (Exception e) {
            log.error("departmentSyncProcessing error", e);
        }
        //经纪人
        try {
            log.info("employeeSyncProcessing run start");
            employeeSyncProcessing.run();
            log.info("employeeSyncProcessing run end");
        } catch (Exception e) {
            log.error("employeeSyncProcessing error", e);
        }
    }

}
